Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can run Windows integration tests under Wine #1011

Merged
merged 8 commits into from
Nov 14, 2019

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Nov 12, 2019

Relates to #703.

Overview

  • It's possible to execute cardano-wallet-jormungandr:test:integration under Wine.

Comments

The tests run on Windows but there is something weird going on with Wine.

2019-11-12-14-30-53-wine-integration-tests

To build and run the tests under wine, use:

wine $(nix-build release.nix -A x86_64-pc-mingw32.tests.cardano-wallet-jormungandr.integration.x86_64-linux -o integration-windows)/cardano-wallet-jormungandr-2019.11.7/integration.exe

@rvl rvl assigned angerman and rvl Nov 12, 2019
@rvl rvl force-pushed the rvl/703/wine-integration-tests branch from 469c3fa to b35ebce Compare November 13, 2019 02:16
@angerman
Copy link
Contributor

After boiling down the example to a tiny C program, and ending up enquiring on the wine-devel mailign list, we end up with: piping the wine call through cat and it work. For reference: the wine-devel thread: https://www.winehq.org/pipermail/wine-devel/2019-November/154508.html

@KtorZ KtorZ force-pushed the rvl/703/wine-integration-tests branch from b35ebce to aa81f70 Compare November 13, 2019 17:19
@KtorZ
Copy link
Member

KtorZ commented Nov 13, 2019

My fix apparently did nothing:

  test/integration/Cardano/Wallet/Jormungandr/NetworkSpec.hs:143:9: 
  1) No backend required, Cardano.Wallet.NetworkSpec, Happy Paths, get network tip
       uncaught exception: IOException of type OtherError
       Network.Socket.connect: <socket: 120>: failed (Connection refused (WSAECONNREFUSED))

  To rerun use: --match "/No backend required/Cardano.Wallet.NetworkSpec/Happy Paths/get network tip/"

... Perhaps it's not in the servant client, but, elsewhere when the network manager is created.

@KtorZ KtorZ force-pushed the rvl/703/wine-integration-tests branch from aa81f70 to f0aad4a Compare November 13, 2019 19:24
@KtorZ
Copy link
Member

KtorZ commented Nov 13, 2019

Haha! Seems like I found it (see my latest commit). At least, I am not getting any connection error and it seems that Jörmungandr is starting. However, I am running into some weird issues now which seems to be attributed to Jörmungandr inside wine 🤔 ...

Screenshot from 2019-11-13 20-24-27

Screenshot from 2019-11-13 20-26-48

@rvl rvl force-pushed the rvl/703/wine-integration-tests branch from f0aad4a to e5c5188 Compare November 14, 2019 05:36
KtorZ and others added 5 commits November 14, 2019 20:42
…pen.

Seems like the servant-client does not handle IO / Network exceptions
that can occur on Windows correctly. So this is a first work-around
that. We may want to move this logic to our Jörmungandr http-client
itself to actually properly handle this type of failure on every
endpoint.
The other errors are not related to the port being available.
(contains wine tests runner)
@rvl rvl force-pushed the rvl/703/wine-integration-tests branch from 13fd6fa to 1193331 Compare November 14, 2019 10:42
@rvl rvl changed the title wip: Windows integration tests under Wine Can run Windows integration tests under Wine Nov 14, 2019
@rvl rvl marked this pull request as ready for review November 14, 2019 10:45
@rvl
Copy link
Contributor Author

rvl commented Nov 14, 2019

Can we review and merge this now, so that we have the isPortOpen bug fix in master?
I have removed the testing code, etc.

Copy link
Member

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 14, 2019

Canceled

@rvl
Copy link
Contributor Author

rvl commented Nov 14, 2019

Oops, I accidentally forced push over a fix.

bors r+

iohk-bors bot added a commit that referenced this pull request Nov 14, 2019
1011: Can run Windows integration tests under Wine r=rvl a=rvl

Relates to #703.

# Overview

- [ ] It's possible to execute `cardano-wallet-jormungandr:test:integration` under Wine.

# Comments

The tests run on Windows but there is something weird going on with Wine.

![2019-11-12-14-30-53-wine-integration-tests](https://user-images.githubusercontent.com/1019641/68679174-19e1db00-05ab-11ea-9c62-8a30e2807f77.png)

To build and run the tests under wine, use:
```
wine $(nix-build release.nix -A x86_64-pc-mingw32.tests.cardano-wallet-jormungandr.integration.x86_64-linux -o integration-windows)/cardano-wallet-jormungandr-2019.11.7/integration.exe
```


1028: Fix the initial sleep delay in the chain following r=KtorZ a=Anviking


# Issue Number

#1027


# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have changed the initial sleep delay from `0` to `1 s`.


# Comments

- Minor downside: we sleep for the initial delay on startup.

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
Co-authored-by: KtorZ <matthias.benkort@gmail.com>
Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 14, 2019

Build succeeded

@iohk-bors iohk-bors bot merged commit 5718446 into master Nov 14, 2019
@KtorZ KtorZ deleted the rvl/703/wine-integration-tests branch November 14, 2019 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants